""" lists
Simple program that allows management of a list by a user
NB lists start at index number of 0 and so a list of four items goes from [0] to [3]"""
import random

greetings =['Bonjour', 'Hallo', 'Hola', 'Ciao']

def manage_list():
    choice = input("Enter A for add a greeting, D for delete a greeting ")
    if choice == "A":
        newgreeting = input("Enter the new greeting ")
        greetings.append(newgreeting)
    if choice == "D":
        print("Not yet implemented, YOU NEED TO DO THIS PART YOURSELF")

def random_entry():
    i =random.randint(0,len(greetings)-1)
    print(greetings[i])

print(greetings)

while 1==1:
    choice = input("Enter M for manage list, V for view list, R for random list entry ")
    if choice == "M":
        manage_list()
    if choice == "R":
        random_entry()
        # VIEW is currently not coded.

        
""" Tasks:
1) Try the program as it is
2) Create the if block and define the function for the view list option.
TEST THIS CHANGE
3) Add an option to allow the user to enter the greeting number to display
TEST IT AGAIN
4) For the Brave only.......Change the delete option so that the user enters the greeting
   to delete rather than its index number"""
#if finished:
#    http://docs.python.org/3.3/tutorial/introduction.html OR continue Python for Kids#